from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin

from account.models import User


@admin.register(User)
class UserAdmin(BaseUserAdmin):
    list_display = ('id', 'username', 'name')
    search_fields = ('name',)

    def has_delete_permission(self, request, obj=None):
        return False
